****************************************************
** CROSS SECTIONAL FRIM CHARACTERISTICS TABLE
****************************************************

use "C:\Users\mcsam\Dropbox\Decomposing Firm Betas\Submissions\JPE Macro\Replication Folder\\Table_3_data",clear

collapse cash_sht leverage *markup* sc_vol_inv_rate churn chnew sga_sale sale ad_sales rd_sales xad xrd tnic3hhi tnic3tsimm indic_hhi indic_simm, by(category_code gvkey)
global new_controls "ad_sales rd_sales xad xrd tnic3hhi tnic3tsimm indic_hhi indic_simm"

reghdfe cash_sht churn sga_sale sale $new_controls, ab( category_code) vce(robust) keepsin
outreg2 using "Output/Tables/Churn_Firmchars.tex", title() keep(churn sga_sale) tex(landscape pr frag) drop() label addtext(Industry FE, YES, Firm Controls, YES) ctitle("Cash") nocons replace

reghdfe leverage churn sga_sale sale $new_controls, ab( category_code) vce(robust) keepsin
outreg2 using "Output/Tables/Churn_Firmchars.tex", title() keep(churn sga_sale) tex(landscape pr frag) drop() label addtext(Industry FE, YES, Firm Controls, YES) ctitle("Leverage") nocons

reghdfe w1markup_dlw churn sga_sale  $new_controls, ab( category_code) vce(robust) keepsin
outreg2 using "Output/Tables/Churn_Firmchars.tex", title() keep(churn sga_sale) tex(landscape pr frag) drop() label addtext(Industry FE, YES, Firm Controls, YES) ctitle("Markup") nocons

reghdfe sc_vol_inv_rate churn sga_sale sale $new_controls, ab( category_code) vce(robust) keepsin
outreg2 using "Output/Tables/Churn_Firmchars.tex", title() keep(churn sga_sale) tex(landscape pr frag) drop() label addtext(Industry FE, YES, Firm Controls, YES) ctitle("SD(Invest Rate)") nocons
